package cn.melonlib.cores.graphql.model.bean;

import lombok.Data;
import lombok.Getter;

import java.util.UUID;

@Data
public class GraphQLEntityPackage<DATA> {



    private GraphQLResultInfo resultInfo;

    private DATA entity;

    private String uuid= UUID.randomUUID().toString();

    public GraphQLEntityPackage(){}
    public static <DATA>GraphQLEntityPackage create(DATA entity,GraphQLResultInfo resultInfo){
        GraphQLEntityPackage<DATA> entityPackage=new GraphQLEntityPackage();
        entityPackage.entity=entity;
        entityPackage.resultInfo=resultInfo;
        return entityPackage;
    }
}
